package com.wocao.controller;

import com.wocao.entity.ReqBody;
import com.wocao.entity.ResponseResult;
import com.wocao.service.ZyOwnerRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.ws.rs.POST;

@CrossOrigin
@RestController
@RequestMapping("/zyOwnerRoom")
public class ZyOwnerRoomController {
    @Autowired
    private ZyOwnerRoomService zyOwnerRoomService;

    @PutMapping("controlsOk")
    public ResponseResult controlsOk(@RequestBody ReqBody reqBody){
        zyOwnerRoomService.controlsOk(reqBody);
        return ResponseResult.ok("绑定成功");
    }

    @PutMapping("controlsNo")
    public ResponseResult controlsNo(@RequestBody ReqBody reqBody){
        zyOwnerRoomService.controlsNo(reqBody);
        return ResponseResult.ok("拒绝绑定操作完成");
    }

}
